﻿@{
    ViewBag.Title = "Hasten";
    Layout = "~/Views/Shared/_Layout.cshtml";
    YJ.Platform.WorkFlowTask WFT = new YJ.Platform.WorkFlowTask();
    string taskid=Request.QueryString["taskid"];
    var task=WFT.Get(taskid.ToGuid());
}
<form method="post">
    @Html.AntiForgeryToken()
    <br />
    <table cellpadding="0" cellspacing="1" border="0" width="99%" class="formtable">
        <tr>
            <th style="width: 80px;">被催办人员：</th>
            <td>
                @Html.Raw(WFT.GetHastenUsersCheckboxString(task.ID, "HastenUsers"))
            </td>
        </tr>
        <tr>
            <th>催办方式：</th>
            <td>
                @Html.Raw(YJ.Platform.HastenLog.GetHastenTypeCheckboxString("HastenType", ""))
            </td>
        </tr>
        <tr>
            <th>催办内容：</th>
            <td>
                <textarea class="mytextarea" id="Contents" name="Contents" validate="empty" style="width:99%; height:100px;" runat="server">@("您有一个 " + task.Title + " 待办事项，请尽快办理。")</textarea>
            </td>
        </tr>
    </table>
    <div class="buttondiv">
        <input type="button" value="确定催办" class="mybutton" onclick="checkform(this);" />
        <input type="button" class="mybutton" value="关闭窗口" onclick="new RoadUI.Window().close();" />
    </div>
</form>
<script type="text/javascript">
    $(function ()
    {
        @Html.Raw(ViewBag.script)
    });
    function checkform(but)
    {
        var f = document.forms[0];
        var flag = new RoadUI.Validate().validateForm(f);
        $(but).prop('disabled', flag);
        if (flag)
        {
            f.submit();
        }
    }
</script>
